package com.hx.vending.dao;

import com.hx.vending.bean.Goods;
import com.hx.vending.bean.entity.GoodsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/11/26.
 * 商品
 */
@Repository
public interface GoodsMapper {

    int deleteByPrimaryKey(Integer goodsId);

    int insertSelective(Goods record);

    Goods selectByPrimaryKeySelective(Goods record);

    List<Goods> selectByExampleSelective(Goods record);

    int updateByPrimaryKeySelective(Goods record);

    // 根据用户ID或日期查询礼品消耗记录
    Map<String,Object> getGoodsByEquipmentInfo(@Param("userId") Integer userId, @Param("startTime")String startTime,
                                               @Param("endTime")String endTime, @Param("fieldList") List<Integer> fieldList);

    Goods selectByPrimary(Goods goods);

    List<Goods> selectByExample(Goods goods);

    List<Goods> selectByExampleState(Goods goods);
 }
